<template>
  <div id="app" class="fillcontain" @mouseover="OperatingWebsite()">
    <transition name="fade" mode="out-in">
      <!-- <loading v-if="loading"></loading> -->
      <router-view></router-view>
    </transition>
  </div>
</template>

<script>
// import { mapState } from "vuex";
// import Loading from "./components/loading";
// import "./assets/css/reset.css";
export default {
  name: "App",
  data() {
    return {
      currentTime: new Date().getTime()
    };
  },
  //   computed: {
  //     ...mapState(["loading"])
  //   },
  //   components: {
  //     Loading
  //   },
  mounted() {
    console.log('VUE_APP_BASE_API',process.env.VUE_APP_BASE_API)
  },
  methods: {
    OperatingWebsite() {
      let currentTime = this.currentTime;
      //   console.log(currentTime, "currentTime");
      let lastTime = new Date().getTime();
      //   console.log(lastTime, "lastTime");
      let timeOut = 30 * 60 * 1000; //设置时间 10分钟
      if (lastTime - currentTime > timeOut) {
        // 未操作页面，跳转登录页面
        this.currentTime = new Date().getTime();
        const fullPath = this.$route.fullPath;
        const query = this.$Base64.encode(fullPath);
        this.$router.push("login");
      } else {
        this.currentTime = new Date().getTime();
      }

      // const truthPathQuery = this.$route.query.type;
      // const truthPath = this.$Base64.decode(truthPathQuery); //点击登录的时候跳转这个地址
    }
  }
};
</script>

<style lang="less">
@import "./style/common";
@import "./style/transtion";

// @import "./style/sidebar";
// body .el-table--scrollable-y {
//   .el-table__body-wrapper::-webkit-scrollbar {
//     width: 9px;
//   height:9px;
//   position:absolute;
//   z-index:10000
//   }
//   .gutter {
//     width: 10px !important;
//   }
// }
</style>
<style lang="scss">
@import "./style/page";
</style>